* {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  padding-top: 44px;
}

a,
button {
  cursor: pointer;
  color: inherit;
}

.hide {
  display: none;
}

.container {
  max-width: 1200px;
  margin: auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.input {
  background-color: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  font-size: 16px;
  line-height: 24px;
  padding: 8px 8px 8px 35px;
  background-repeat: no-repeat;
  background-position: left 11px center;
}

.address {
  flex: 0.8;
}

.input-address {
  width: 100%;
  background-image: url(../img/icon/home.svg);
}

.search {
  margin-left: auto;
}

.input-search {
  width: 300px;
  background-image: url(../img/icon/search.svg);
}

.buttons {
  display: flex;
  align-items: center;
}

.button {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  box-sizing: border-box;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.0015);
  border-radius: 2px;
  color: #595959;
  font-size: 16px;
  line-height: 24px;
}

.button:hover {
  background: #1890ff;
  border: 1px solid #1890ff;
  color: #fff;
}

.button-primary {
  background: #1890ff;
  border: 1px solid #1890ff;
  color: #fff;
  margin-right: 10px;
}

.button-primary:hover {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: #595959;
}

.button-icon {
  margin-right: 6px;
}

.button-card-text {
  margin-right: 10px;
}

.button-auth {
  background-position: 20px 13px;
}

.button-primary .button-auth-svg {
  width: 24px;
  height: 24px;
  background-color: #fff;
  -webkit-mask: url("../img/icon/user.svg") no-repeat 50% 50%;
  mask: url("../img/icon/user.svg") no-repeat 50% 50%;
  background-repeat: no-repeat;
}

.button-primary:hover .button-auth-svg {
  background-color: #595959;
}

.button .button-cart-svg {
  width: 24px;
  height: 24px;
  background-color: #595959;
  -webkit-mask: url("../img/icon/shopping-cart.svg") no-repeat 50% 50%;
  mask: url("../img/icon/shopping-cart.svg") no-repeat 50% 50%;
  background-repeat: no-repeat;
}

.button-primary .button-cart-svg {
  background-color: #fff;
}

.button:hover .button-cart-svg {
  background-color: #fff;
}

.button-primary:hover .button-cart-svg {
  background-color: #595959;
}

.button-cart {
  display: none;
  margin: 0 5px;
}

.button-out {
  display: none;
  margin: 0 5px;
}

.user-name {
  display: none;
  margin-right: 20px;
  font-weight: bold;
  font-size: 18px;
}

.promo-slider {
  width: 600px;
  height: 300px;
}

.promo {
  box-shadow: 0 7px 12px rgba(158, 158, 163, 0.1);
  border-radius: 10px;
  padding: 68px 70px;
  margin-bottom: 56px;
}

.pizza {
  background: #fff1b8 url(../img/promo/pizza.png) no-repeat top -100px right -250px /
    830px;
}

.kebab {
  background: #d6e4ff url(../img/promo/kebab.png) no-repeat top 45px right 40px /
    450px;
}

.vegetables {
  background: #fff566 url(../img/promo/vegetables.png) no-repeat top 0 right 0 /
    825px;
}

.sushi {
  background: #fff1f0 url(../img/promo/sushi.png) no-repeat top 10px right 15px /
    500px;
}

.promo-title {
  font-style: normal;
  font-weight: bold;
  font-size: 39px;
  line-height: 46px;
  color: #302c34;
}

.promo-text {
  font-style: normal;
  font-weight: normal;
  font-size: 24px;
  line-height: 28px;
  color: #302c34;
  max-width: 538px;
}

.main {
  background: linear-gradient(
    180deg,
    rgba(245, 245, 245, 0) 1.04%,
    #f5f5f5 100%
  );
}

.section-heading {
  display: flex;
  align-items: center;
  margin-bottom: 44px;
}

.section-title {
  font-style: normal;
  font-weight: bold;
  font-size: 36px;
  line-height: 42px;
  margin: 0 30px 0 0;
  color: #000000;
}

.cards {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.card {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 30px;
  flex-basis: 31%;
  text-decoration: none;
}

.card-restaurant {
  cursor: pointer;
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-text {
  padding: 20px 23px 35px;
  min-height: 275px;
  display: flex;
  flex-direction: column;
}

.restaurants .card-text {
  min-height: auto;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-title {
  margin: 0;
  font-style: normal;
  font-weight: bold;
  font-size: 22px;
  line-height: 32px;
}

.card-title-reg {
  font-weight: 400;
}

.card-tag {
  font-style: normal;
  font-weight: normal;
  font-size: 12px;
  line-height: 20px;
  color: #ffffff;
  background: #262626;
  border-radius: 2px;
  padding: 1px 8px;
}

.card-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.card-buttons {
  display: flex;
  margin-top: 24px;
  flex-grow: 1;
  align-items: flex-end;
}

.card-price-bold {
  font-weight: bold;
  font-size: 20px;
  line-height: 32px;
  margin-left: 30px;
}

.rating {
  background-image: url("../img/icon/rating.svg");
  background-repeat: no-repeat;
  background-position: 0 7px;
  padding-left: 20px;
  margin-right: 26px;
  color: #ffc107;
  font-weight: bold;
  font-size: 18px;
  line-height: 32px;
}

.price,
.category {
  color: #8c8c8c;
  font-size: 18px;
  line-height: 32px;
}

.price {
  margin-right: 10px;
}

.ingredients {
  color: #8c8c8c;
  font-size: 18px;
  line-height: 21px;
}

.category {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 150px;
}

.price:after {
  content: "";
  width: 5px;
  height: 5px;
  background-color: #8c8c8c;
  display: inline-block;
  vertical-align: middle;
  border-radius: 50%;
  margin-left: 10px;
}

.footer {
  padding: 60px 0;
}

.footer-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-nav {
  margin-left: 35px;
  margin-right: auto;
}

.footer-link {
  display: inline-block;
  color: #595959;
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
  line-height: 21px;
  text-decoration: none;
}

.footer-link:not(:last-child) {
  margin-right: 15px;
}

.social-links {
  display: flex;
  align-items: center;
}

.social-link:not(:last-child) {
  margin-right: 21px;
}

.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 999;
}

.modal-auth {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 999;
}

.is-open {
  display: flex;
}

.modal-dialog {
  max-width: 780px;
  width: 95%;
  background: #ffffff;
  border-radius: 5px;
  margin: auto;
  padding: 40px 45px;
}

.modal-dialog-auth {
  width: auto;
  position: relative;
}

.label-auth {
  display: block;
  margin: 30px;
}

.label-auth span {
  width: 80px;
  display: inline-block;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 45px;
}

.modal-title {
  margin: 0;
  font-weight: bold;
  font-size: 36px;
  line-height: 42px;
}

.close {
  font-size: 36px;
  border: none;
  background-color: transparent;
}

.close-auth {
  font-size: 36px;
  border: none;
  background-color: transparent;
  position: absolute;
  top: 10px;
  right: 20px;
}

.modal-body {
  margin-bottom: 22px;
}

.food-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 15px;
}

.food-name {
  font-weight: normal;
  font-size: 18px;
  line-height: 32px;
}

.food-price {
  margin-left: auto;
  margin-right: 47px;
  font-weight: bold;
  font-size: 20px;
  line-height: 32px;
}

.food-counter {
  display: flex;
  align-items: center;
}

.counter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 32px;
  background: #ffffff;
  border: 1px solid #40a9ff;
  box-sizing: border-box;
  border-radius: 2px;
  font-weight: normal;
  font-size: 14px;
  line-height: 22px;
  color: #40a9ff;
}

.counter-button:hover {
  background: #40a9ff;
  border: 1px solid #ffffff;
  color: #ffffff;
}

.counter {
  font-size: 16px;
  line-height: 24px;
  margin-left: 10px;
  margin-right: 10px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-auth .modal-footer {
  justify-content: flex-end;
}

.footer-buttons {
  display: flex;
  align-items: center;
}

.modal-pricetag {
  background: #262626;
  border-radius: 5px;
  color: #ffffff;
  padding: 15px 20px;
  font-size: 20px;
  line-height: 23px;
}

@media (max-width: 1366px) {
  .container {
    max-width: 960px;
  }

  .pizza {
    background-position: center right -300px;
    background-size: 750px;
  }

  .kebab {
    background-position: top -5px right -93px;
    background-size: 530px;
  }

  .vegetables {
    background-position: top 0 right -93px;
    background-size: 820px;
  }

  .sushi {
    background-position: center right -90px;
  }

  .rating {
    margin-right: 15px;
  }

  .category,
  .price {
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 750px;
  }

  .pizza {
    padding: 50px;
    background-size: 500px;
    background-position: center right -200px;
  }

  .kebab {
    background-position: top 55px right -100px;
    background-size: 385px;
  }

  .vegetables {
    background-position: top 0 right -280px;
    background-size: 810px;
  }

  .sushi {
    background-position: top 30px right -175px;
  }

  .promo-text {
    font-size: 18px;
    max-width: 400px;
  }

  .card {
    flex-basis: 49%;
  }

  .footer-link {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 560px;
  }

  .card-info {
    flex-wrap: wrap;
  }

  .card .rating {
    flex-basis: 100%;
  }

  .card-title {
    font-size: 18px;
  }

  .card-text {
    min-height: 290px;
  }

  .card-price-bold {
    margin-left: 20px;
  }

  .pizza {
    background-size: 400px;
    background-position: bottom 50px right -200px;
  }

  .kebab {
    background-position: top -5px right -74px;
    background-size: 300px;
  }

  .vegetables {
    background-position: top 0 right -240px;
    background-size: 702px;
  }

  .sushi {
    background-position: top -24px right -75px;
    background-size: 302px;
  }

  .promo-title {
    font-size: 24px;
    line-height: 1.4;
  }

  .promo-text {
    margin-top: 0;
  }
}

@media (max-width: 578px) {
  .container {
    width: 90%;
  }

  .address {
    min-width: 100%;
    order: 1;
  }

  .header {
    flex-wrap: wrap;
  }

  .input-address {
    margin-top: 15px;
    order: 5;
    flex: 1;
  }

  .promo {
    background-image: none;
  }

  .promo-title {
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 20px;
  }

  .card {
    flex-basis: 100%;
  }

  .card-text {
    min-height: auto;
  }

  .card-image {
    width: 100%;
  }

  .footer {
    padding: 30px 0;
  }

  .footer-block {
    align-items: flex-start;
  }

  .footer-nav {
    margin-left: 0;
    margin-right: 0;
    order: 0;
    display: flex;
    flex-direction: column;
  }

  .footer-logo {
    margin-right: 15px;
    order: 1;
  }

  .social-links {
    order: 2;
  }
}

@media (max-width: 480px) {
  .button-text {
    display: none;
  }

  .button-icon {
    margin: 0;
  }

  .user-name {
    margin: 10px;
  }

  .buttons {
    flex-wrap: wrap;
    margin-left: auto;
  }

  .button {
    min-height: 40px;
    padding: 5px 12px;
  }

  .button-out-svg {
    width: 24px;
    height: 24px;
    background-color: #fff;
    -webkit-mask: url(../img/icon/logout.svg) no-repeat 50% 50%;
    mask: url(../img/icon/logout.svg) no-repeat 50% 50%;
    background-repeat: no-repeat;
    -webkit-mask-size: 20px;
    mask-size: 20px;
  }

  .promo {
    padding: 20px;
  }

  .section-heading {
    flex-wrap: wrap;
  }

  .footer-block {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    order: 0;
    margin-bottom: 20px;
  }

  .footer-nav {
    margin-bottom: 20px;
    text-align: center;
  }

  .footer-link:not(:last-child) {
    margin-right: 0;
  }
}
